﻿function CheckBankInfo()
{
    var prefix = "ctl00_ContentPlaceHolder1_";
    var alipaynumber = document.getElementById(prefix + "txtAliPayNumber");
    var bankaccountnumber = document.getElementById(prefix + "txtBankAccountNumber");
    var bankaccountname = document.getElementById(prefix + "txtBankAccountName");
    var bankname = document.getElementById(prefix + "txtBankName");
    var openbankname = document.getElementById(prefix + "txtOpenBankName");


    if (alipaynumber.value.length == 0 && bankaccountname.value.length == 0)
    {
        alert('请输入其中一个支付方式');
        return false;
    }
    if (bankaccountname.value.length > 0)
    {
        if (bankaccountname.value.length == 0)
        {
            alert("请输入持卡人名称");
            bankaccountname.focus();
            return false;
        }
        if (openbankname.value.length == 0)
        {
            alert("请输入开户行名称");
            openbankname.focus();
            return false;
        }
        if (bankname.value.length == 0)
        {
            alert("请输入银行账号");
            bankaccountnumber.focus();
            return false;
        }
        
    }
    return true;
}